home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / tuning / download / xteq / setup.exe / {app} / plugins / XQ New Folder Command.xpl < prev    next >
Text File  |  2001-05-14  |  3KB  |  88 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="1"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Files&Folders\Folders Context Menu"
  5. "UIPATH 2"="Appearance\Files&Folders\Drives"
  6. "NAME"="New Folder Context Menu"
  7. "VERSION"="1.03"
  8. "-OSVERSION"="11111"
  9. "LANGUAGE"="VBScript"
  10. "TEXT 1"="Name"
  11. "-DATA 1"="  "
  12. "-DATA 2"="Commands (*.com)|*.com"
  13. "DESCRIPTION 1"="This plug-in will place a new entry in the context menu [right-click] of Folders, Shortcuts to Folders, Drives & some system (e.g. My Computer, Recycle Bin, Control Panel) icons. 
  14. "DESCRIPTION 2"="Activating this new entry will create a new folder, with the name "NewFolder", below the selected item.
  15. "DESCRIPTION 3"="Please supply the name of this new entry as it should appear in the context menu. For example, if you enter "Create Subdir", this text will appear in the context menu."
  16. "DESCRIPTION 3"="To remove the New Folder function, clear the field and apply your changes." 
  17. "VERSION"="1.00"
  18. "AUTHOR"="Ojatex@aol.com"
  19. "CONTACTURL"="http://members.aol.com/ojatex/"
  20. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  21.  
  22.  
  23.  sPathBase1="HKCR\folder\shell\XQNewFolderCommand"
  24.  sPathBase2="HKCR\folder\shell\XQNewFolderCommand\Command"
  25.  
  26.  sPathName="HKCR\folder\shell\XQNewFolderCommand\@"
  27.   sPathCMD="HKCR\folder\shell\XQNewFolderCommand\Command\@"
  28. sPathFlags="HKCR\folder\shell\XQNewFolderCommand\EditFlags"
  29.  
  30.  
  31. sCMD_W9x="command.com /c MD ""%1\NewFolder"""
  32. sCMD_W2K="cmd.exe /c MD ""%1\NewFolder"""
  33.  
  34.  
  35. SUB Plugin_Initialize
  36.  s=RegReadValue(sPathName) 
  37.  SetUIElement 1,s
  38.  
  39. END SUB
  40.  
  41. SUB Plugin_CheckData(ElementIndex)
  42. END SUB
  43.  
  44. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  45.  sName=GetUIElement(1)
  46.  
  47.  if len(sName)>0 then
  48.  
  49.     'ACtivate it!
  50.     sCMD=""
  51.     if GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then 'W9x
  52.        sCMD=sCMD_W9x
  53.     else
  54.        sCMD=SCMD_W2K
  55.     end if
  56.  
  57.     Call RegWriteValue(sPathName,sName,1)
  58.     Call RegWriteValue(sPathCMD,sCMD,1)
  59.     Call RegWriteValue(sPathFlags,"01000000",3)
  60.  
  61.  else
  62.  
  63.     'deactivate it
  64.     s=RegReadValue(sPathName)
  65.     if len(s)>0 then Call RegWriteValue(sPathName,"",1)
  66.  
  67.     s=RegReadValue(sPathCMD)
  68.     if len(s)>0 then Call RegWriteValue(sPathCMD,"",1)
  69.  
  70.     if RegValueExists(sPathFlags)=true then
  71.        RegDeleteValue(sPathFlags)
  72.     end if
  73.  
  74.     If RegPathExists(sPathBase2)=true then
  75.        RegDeletePath(sPathBase2)
  76.     end if
  77.  
  78.     If RegPathExists(sPathBase1)=true then
  79.        RegDeletePath(sPathBase1)
  80.     end if
  81.  
  82.  end if
  83. END SUB
  84.  
  85. SUB Plugin_Terminate
  86. END SUB
  87.  
  88.